﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using KeRui.Common;
using System.Collections.Generic;


public partial class Manage_Cms_CmsVoteIp : System.Web.UI.Page
{
    //基础
    public List<KeRui.Model.CmsVoteIp> list;
    public int PageSize = 5;                               //每页数量
    public int PageIndex = PageRequest.GetInt("page", 1);   //请求的页码
    public int PageCS = PageRequest.GetInt("cs", -1);       //记录总数
    public int PageCount = 0;                               //总页数
    public string PageShow = "";
    public int VoteID = PageRequest.GetInt("VoteID", -1);                  
    protected void Page_Load(object sender, EventArgs e)
    {
        KeRui.BLL.CmsVoteIp bllCmsVoteIp = new KeRui.BLL.CmsVoteIp();
        list = bllCmsVoteIp.GetList(PageSize, PageIndex, VoteID);

        //总数
        if (PageCS == -1)
            PageCS = bllCmsVoteIp.GetCount(VoteID);
        //总页数
        if (PageCS % PageSize == 0)
            PageCount = PageCS / PageSize;
        else
            PageCount = PageCS / PageSize + 1;
        //分页显示
        PageShow = ManageHelper.showSplitPage("CmsVoteIp.aspx?cs=" + PageCS.ToString() + "&page={0}&VoteID=" + VoteID, PageIndex, PageSize, PageCS);
    }
}
